package com.ruoyi.file.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.file.model.vo.Files;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @author ZMK
 * {@code @description} 针对表【files】的数据库操作Mapper
 * {@code @createDate} 2025-03-06 00:02:39
 * {@code @Entity} com.ruoyi.file.mapper.domain.Files
 */
@Mapper
public interface FilesMapper extends BaseMapper<Files> {

    int deleteByPrimaryKey(Long id);

    int insertXml(Files record);

    int insertSelective(Files record);

    Files selectByPrimaryKey(Long id);

    @Select("select id, upload_id, file_md5, url, file_name, bucket_name, file_type, file_size, chunk_size, chunk_num, is_delete, enable, create_time, update_time from files where file_md5=#{fileMd5}")
    Files selectByFileMd5(String md5);

    int updateByPrimaryKeySelective(Files record);

    int updateByPrimaryKey(Files record);

}
